package com.example.result;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    private Integer code;
    private String msg;
    private  Object data;

    public static Result sucusess(Object data) {
        return  new Result(1,"成功",data);
    }
    public static Result sucusess() {
        return  new Result(1,"成功",null);
    }
    public static Result eorre() {
        return  new Result(0,"失败",null);
    }
    public static Result eorre(String msg) {
        return  new Result(0,msg,null);
    }
}
